#pragma warning(disable:4996)
#include<stdio.h>
#include<assert.h>
#define N 10
//strchr的实现
char* Strchr(const char* arr, int target)
{
        assert(arr);
        while (*arr && *arr != target)
               arr++;
        if (*arr == target)
               return (char*)arr;
        else
               return NULL;
}
//最坏的情况是最后一次才查找到，所以时间复杂度为O(n)
int main()
{
        const char* arr = "abcdef";
        char target;
        scanf("%c", &target);
        char* ret = Strchr(arr, target);
        printf("%s\n", ret);
        return 0;
}
